load(
    "//tensorflow:tensorflow.bzl",
    "if_cuda_or_rocm",
    "tf_cc_test",
    "tf_cuda_library",
)
load("//tensorflow:tensorflow.default.bzl", "tf_kernel_library")
load(
    "//tensorflow/core/platform:build_config.bzl",
    "tf_additional_all_protos",
    "tf_proto_library",
)
load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("@local_tsl//tsl/platform:build_config_root.bzl", "if_static")

package(
    # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
    default_visibility = [
        # copybara:uncomment "//learning/infra/mira:__subpackages__",
        "//third_party/cloud_tpu/inference_converter:__subpackages__",
        "//tensorflow/compiler/tf2xla:internal",
    ],
    licenses = ["notice"],
)

cc_library(
    name = "xla_ops",
    tags = ["optonly"],
    deps = [
        ":aggregate_ops",
        ":all_reduce_op",
        ":approx_topk_op",
        ":arg_op",
        ":batch_matmul_op",
        ":batch_norm_op",
        ":batchtospace_op",
        ":bcast_ops",
        ":beta_op",
        ":bias_ops",
        ":binary_ops",
        ":bincount_op",
        ":broadcast_to_op",
        ":bucketize_op",
        ":case_op",
        ":cast_op",
        ":categorical_op",
        ":cholesky_op",
        ":clip_by_value_op",
        ":concat_op",
        ":const_op",
        ":conv_op_helpers",
        ":conv_ops",
        ":cross_op",
        ":cwise_ops",
        ":data_format_ops",
        ":depthtospace_op",
        ":dequantize_op",
        ":device_index_op",
        ":diag_op",
        ":dynamic_partition_op",
        ":dynamic_slice_ops",
        ":dynamic_stitch_op",
        ":einsum_op",
        ":elu_op",
        ":empty_op",
        ":ensure_shape_op",
        ":extract_image_patches_op",
        ":fake_param_op",
        ":fake_quantize_ops",
        ":fft_ops",
        ":fill_op",
        ":function_ops",
        ":fused_conv_ops",
        ":gather_op",
        ":gather_scatter_ops",
        ":identity_op",
        ":if_op",
        ":image_ops",
        ":image_resize_ops",
        ":in_topk_op",
        ":index_ops",
        ":l2loss_op",
        ":listdiff_op",
        ":lower_upper_bound_ops",
        ":lrn_ops",
        ":matmul_op",
        ":matrix_band_part_op",
        ":matrix_diag_ops",
        ":matrix_inverse_op",
        ":matrix_solve_op",
        ":matrix_triangular_solve_op",
        ":mirror_pad_op",
        ":next_after_op",
        ":no_op",
        ":one_hot_op",
        ":pack_op",
        ":pad_op",
        ":pooling_ops",
        ":qr_op",
        ":quantize_and_dequantize_op",
        ":random_ops",
        ":random_ops_util",
        ":reduce_window_op",
        ":reduction_ops",
        ":reduction_ops_common",
        ":relu_op",
        ":replica_id_op",
        ":reshape_op",
        ":retval_op",
        ":reverse_op",
        ":reverse_sequence_op",
        ":rng_converter_utils",
        ":roll_op",
        ":scan_ops",
        ":scatter_nd_op",
        ":segment_reduction_ops",
        ":select_op",
        ":sendrecv_ops",
        ":sequence_ops",
        ":shape_op",
        ":shape_util",
        ":sharding_op",
        ":sharding_util_ops",
        ":slice_op",
        ":softmax_op",
        ":sort_ops",
        ":spacetobatch_op",
        ":spacetodepth_op",
        ":sparse_to_dense_op",
        ":split_op",
        ":spmd_manual_sharding_ops",
        ":stack_ops",
        ":stateful_random_ops",
        ":stateless_random_ops",
        ":stateless_random_ops_v2",
        ":stochastic_cast_op",
        ":strided_slice_op",
        ":tensor_array_ops",
        ":tensor_list_ops",
        ":tensor_list_utils",
        ":tile_ops",
        ":to_bool_op",
        ":topk_op",
        ":training_ops",
        ":transpose_op",
        ":tridiagonal_ops",
        ":unary_ops",
        ":unary_ops_composition",
        ":uniform_quantized_ops",
        ":unique_op",
        ":unpack_op",
        ":variable_ops",
        ":where_op",
        ":while_op",
        ":xla_broadcast_helper_op",
        ":xla_call_module_op",
        ":xla_conv_op",
        ":xla_custom_call_op",
        ":xla_custom_call_v2_op",
        ":xla_dequantize_op",
        ":xla_dot_op",
        ":xla_optimization_barrier_op",
        ":xla_pad_op",
        ":xla_reduce_op",
        ":xla_reduce_precision_op",
        ":xla_select_and_scatter_op",
        ":xla_self_adjoint_eig_op",
        ":xla_svd_op",
    ],
)

tf_cuda_library(
    name = "light_outside_compilation",
    srcs = ["light_outside_compilation.cc"],
    hdrs = ["light_outside_compilation.h"],
    visibility = ["//visibility:public"],
    deps = [
        ":callback_proto_cc",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla/lib:util",
        "//tensorflow/core:framework",
        "//tensorflow/core:gpu_runtime",
        "//tensorflow/core:protos_all_cc",
        "//tensorflow/core/common_runtime:process_state",
        "//tensorflow/core/platform:env",
        "//tensorflow/core/platform:refcount",
        "//tensorflow/core/platform:status",
        "//tensorflow/core/platform:statusor",
        "//tensorflow/core/platform:types",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/base",
        "@com_google_absl//absl/base:core_headers",
        "@com_google_absl//absl/cleanup",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/container:inlined_vector",
        "@com_google_absl//absl/log",
        "@com_google_absl//absl/log:check",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/numeric:int128",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/strings:str_format",
        "@com_google_absl//absl/synchronization",
        "@com_google_absl//absl/types:span",
        "@local_tsl//tsl/lib/strings:proto_serialization",
        "@local_tsl//tsl/platform:errors",
        "@local_tsl//tsl/platform:fingerprint",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:status_macros",
        "@local_xla//xla:util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/service:custom_call_status",
        "@local_xla//xla/service:custom_call_target_registry",
        "@local_xla//xla/service:hlo_proto_cc",
        "@local_xla//xla/stream_executor",
        "@local_xla//xla/stream_executor/gpu:gpu_executor_header",
        "@local_xla//xla/stream_executor/gpu:gpu_stream_header",
        "@local_xla//xla/stream_executor/gpu:gpu_types_header",
    ],
    alwayslink = 1,
)

# A separate cc_library for resampler_ops is needed because resampler is in
# contrib/, and thus the declaration of resampler cannot be pulled into the deps
# of xla_ops. Therefore, resampler_ops is its own cc_library target, and its
# corresponding tf_kernel_library is defined in contrib/resampler/BUILD.
cc_library(
    name = "resampler_ops",
    srcs = ["resampler_ops.cc"],
    hdrs = ["resampler_ops.h"],
    visibility = ["//visibility:public"],
    deps = [
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla:array4d",
        "@local_xla//xla:literal",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
    ],
    alwayslink = 1,
)

# See note on resampler_ops target for why this is also a seprate op.
cc_library(
    name = "resampler_addon_ops",
    srcs = ["resampler_addon_ops.cc"],
    visibility = ["//visibility:public"],
    deps = [
        ":resampler_ops",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
    ],
    alwayslink = 1,
)

cc_library(
    name = "conv_op_helpers",
    srcs = ["conv_op_helpers.cc"],
    hdrs = ["conv_op_helpers.h"],
    deps = [
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/core:framework",
        "//tensorflow/core/framework:bounds_check",
        "//tensorflow/core/kernels:conv_grad_shape_utils",
        "//tensorflow/core/platform:statusor",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/types:span",
        "@local_tsl//tsl/platform:tensor_float_32_hdr_lib",
        "@local_xla//xla:literal_util",
        "@local_xla//xla:util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
    ] + if_static(["@local_tsl//tsl/platform:tensor_float_32_utils"]),
)

cc_library(
    name = "tensor_list_utils",
    srcs = ["tensor_list_utils.cc"],
    hdrs = ["tensor_list_utils.h"],
    deps = [
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal_util",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:status_macros",
        "@local_xla//xla:util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ],
)

cc_library(
    name = "if_while_utils",
    srcs = ["if_while_utils.cc"],
    hdrs = ["if_while_utils.h"],
    deps = [
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
    ],
)

cc_library(
    name = "xla_call_module_loader",
    srcs = ["xla_call_module_loader.cc"],
    hdrs = ["xla_call_module_loader.h"],
    deps = [
        "//tensorflow/compiler/jit:flags",
        "//tensorflow/compiler/mlir/tensorflow:dump_mlir_util",
        "//tensorflow/compiler/mlir/tensorflow:error_util",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@llvm-project//llvm:Support",
        "@llvm-project//mlir:FuncDialect",
        "@llvm-project//mlir:IR",
        "@llvm-project//mlir:Parser",
        "@llvm-project//mlir:Pass",
        "@llvm-project//mlir:Support",
        "@llvm-project//mlir:Transforms",
        "@local_tsl//tsl/platform:errors",
        "@local_tsl//tsl/platform:regexp",
        "@local_tsl//tsl/platform:status",
        "@local_tsl//tsl/platform:statusor",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/mlir_hlo",
        "@local_xla//xla/mlir_hlo:mhlo_passes",
        "@local_xla//xla/python:refine_polymorphic_shapes",
        "@local_xla//xla/translate/hlo_to_mhlo:hlo_utils",
        "@local_xla//xla/translate/mhlo_to_hlo:mlir_hlo_to_hlo",
        "@stablehlo//:chlo_ops",
        "@stablehlo//:stablehlo_ops",
        "@stablehlo//:stablehlo_passes",
        "@stablehlo//:stablehlo_serialization",
        "@stablehlo//:vhlo_ops",
    ],
)

tf_kernel_library(
    name = "xla_call_module_op",
    srcs = ["xla_call_module_op.cc"],
    deps = [
        ":xla_call_module_loader",
        "//tensorflow/compiler/mlir/tensorflow:convert_type",
        "//tensorflow/compiler/mlir/tensorflow:dump_mlir_util",
        "//tensorflow/compiler/tf2xla:side_effect_util",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "//tensorflow/core/tpu:tpu_defs",
        "@com_google_absl//absl/log",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@llvm-project//llvm:Support",
        "@llvm-project//mlir:FuncDialect",
        "@llvm-project//mlir:FuncExtensions",
        "@llvm-project//mlir:IR",
        "@llvm-project//mlir:Pass",
        "@llvm-project//mlir:Support",
        "@local_tsl//tsl/platform:errors",
        "@local_tsl//tsl/platform:statusor",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/mlir_hlo",
        "@local_xla//xla/mlir_hlo:mhlo_passes",
        "@local_xla//xla/translate/hlo_to_mhlo:hlo_to_mlir_hlo",
        "@local_xla//xla/translate/mhlo_to_hlo:type_to_shape",
    ],
)

tf_kernel_library(
    name = "while_op",
    srcs = ["while_op.cc"],
    hdrs = ["while_op.h"],
    deps = [
        ":if_while_utils",
        ":tensor_list_utils",
        "//tensorflow/compiler/tf2xla:side_effect_util",
        "//tensorflow/compiler/tf2xla:tf2xla_util",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:portable_gif_internal",
        "//tensorflow/core:protos_all_cc",
        "//tensorflow/core/platform:errors",
        "//tensorflow/core/platform:status",
        "//tensorflow/core/platform:statusor",
        "@com_google_absl//absl/container:inlined_vector",
        "@com_google_absl//absl/log",
        "@com_google_absl//absl/strings",
        "@local_tsl//tsl/platform:errors",
        "@local_xla//xla:shape_tree",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:status_macros",
        "@local_xla//xla/client",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/client/lib:tuple",
    ],
)

tf_kernel_library(
    name = "if_op",
    srcs = ["if_op.cc"],
    hdrs = ["if_op.h"],
    deps = [
        ":if_while_utils",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:side_effect_util",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:dynamic_shaped_ops",
    ],
)

tf_kernel_library(
    name = "case_op",
    srcs = ["case_op.cc"],
    hdrs = ["case_op.h"],
    deps = [
        ":if_while_utils",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:side_effect_util",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:dynamic_shaped_ops",
    ],
)

# Kernels that have a dummy (no-op) implementation.
tf_kernel_library(
    name = "xla_dummy_ops",
    srcs = [
        "assert_op.cc",
        "check_numerics_op.cc",
    ],
    deps = [
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/core:array_ops_op_lib",
        "//tensorflow/core:lib",
        "//tensorflow/core:logging_ops_op_lib",
    ],
    alwayslink = 1,
)

tf_proto_library(
    name = "callback_proto",
    srcs = ["callback.proto"],
    cc_api_version = 2,
    protodeps = tf_additional_all_protos(),
)

cc_library(
    name = "rng_converter_utils",
    srcs = ["rng_converter_utils.cc"],
    hdrs = ["rng_converter_utils.h"],
    deps = [
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/core:framework",
        "@local_xla//xla:xla_data_proto_cc",
    ],
)

tf_kernel_library(
    name = "xla_dot_op",
    srcs = ["xla_dot_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "training_ops",
    srcs = ["training_ops.cc"],
    deps = [
        ":case_op",
        ":cwise_ops",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "batch_matmul_op",
    srcs = ["batch_matmul_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:util",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_tsl//tsl/platform:tensor_float_32_hdr_lib",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client/lib:math",
        "@local_xla//xla/client/lib:matrix",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ) + if_static(["@local_tsl//tsl/platform:tensor_float_32_utils"]),
)

tf_kernel_library(
    name = "softmax_op",
    srcs = ["softmax_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core:protos_all_cc",
        "@com_google_absl//absl/strings",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "in_topk_op",
    srcs = ["in_topk_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:sorting",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "unary_ops_composition",
    srcs = ["unary_ops_composition.cc"],
    deps = [
        ":case_op",
        ":cwise_ops",
        ":elu_op",
        ":if_op",
        ":relu_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/strings",
        "@local_xla//xla/client:client_library",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "topk_op",
    srcs = ["topk_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:sorting",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "tensor_array_ops",
    srcs = ["tensor_array_ops.cc"],
    deps = [
        ":case_op",
        ":gather_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "tile_ops",
    srcs = ["tile_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/types:span",
        "@local_xla//xla/client:value_inference",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "strided_slice_op",
    srcs = ["strided_slice_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/types:span",
        "@local_xla//xla:literal",
        "@local_xla//xla:util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:value_inference",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:dynamic_shaped_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_broadcast_helper_op",
    srcs = ["xla_broadcast_helper_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/strings",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_svd_op",
    srcs = ["xla_svd_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:lib",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:slicing",
        "@local_xla//xla/client/lib:svd",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "reduction_ops",
    srcs = ["reduction_ops.cc"],
    hdrs = ["reduction_ops.h"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "batchtospace_op",
    srcs = ["batchtospace_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "spmd_manual_sharding_ops",
    srcs = ["spmd_manual_sharding_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/mlir/tensorflow:xla_sharding_util",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "fused_conv_ops",
    srcs = ["fused_conv_ops.cc"],
    deps = [
        ":case_op",
        ":conv_op_helpers",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "matrix_band_part_op",
    srcs = ["matrix_band_part_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "clip_by_value_op",
    srcs = ["clip_by_value_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "sharding_util_ops",
    srcs = ["sharding_util_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core:protos_all_cc",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/types:span",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "sort_ops",
    srcs = ["sort_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:comparators",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "matrix_inverse_op",
    srcs = ["matrix_inverse_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:matrix",
        "@local_xla//xla/client/lib:qr",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "reduce_window_op",
    srcs = ["reduce_window_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "pad_op",
    srcs = ["pad_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:value_inference",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "function_ops",
    srcs = ["function_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "sparse_to_dense_op",
    srcs = ["sparse_to_dense_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:scatter",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "reverse_op",
    srcs = ["reverse_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "random_ops",
    srcs = ["random_ops.cc"],
    deps = [
        ":case_op",
        ":gather_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/lib:random",
        "//tensorflow/compiler/tf2xla/lib:util",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:value_inference",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:comparators",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:dynamic_shaped_ops",
        "@local_xla//xla/client/lib:loops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "gather_op",
    srcs = ["gather_op.cc"],
    hdrs = ["gather_op_helpers.h"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/types:optional",
        "@local_xla//xla:status_macros",
        "@local_xla//xla/client:client_library",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:slicing",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "segment_reduction_ops",
    srcs = ["segment_reduction_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:scatter",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla/client:value_inference",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "dynamic_partition_op",
    srcs = ["dynamic_partition_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core/tpu:tpu_defs",
        "@com_google_absl//absl/algorithm:container",
        "@local_xla//xla:comparison_util",
        "@local_xla//xla:shape_util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:comparators",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "transpose_op",
    srcs = ["transpose_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:scatter",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:shape_util",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "identity_op",
    srcs = ["identity_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":tensor_list_utils",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "tensor_list_ops",
    srcs = ["tensor_list_ops.cc"],
    deps = [
        ":case_op",
        ":gather_op",
        ":if_op",
        ":tensor_list_utils",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
        "@local_xla//xla:status_macros",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "cross_op",
    srcs = ["cross_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "next_after_op",
    srcs = ["next_after_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "stochastic_cast_op",
    srcs = ["stochastic_cast_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":random_ops_util",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "//tensorflow/core/kernels:stochastic_cast_op_header",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "select_op",
    srcs = ["select_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "l2loss_op",
    srcs = ["l2loss_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "arg_op",
    srcs = ["arg_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal_util",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "shape_util",
    srcs = ["shape_util.cc"],
    hdrs = ["shape_util.h"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "to_bool_op",
    srcs = ["to_bool_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:lib",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "mirror_pad_op",
    srcs = ["mirror_pad_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_reduce_op",
    srcs = ["xla_reduce_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/algorithm:container",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "qr_op",
    srcs = ["qr_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla/client/lib:qr",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "slice_op",
    srcs = ["slice_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/types:span",
        "@local_xla//xla:util",
        "@local_xla//xla/client:value_inference",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:dynamic_shaped_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "pack_op",
    srcs = ["pack_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal_util",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "all_reduce_op",
    srcs = ["all_reduce_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "sharding_op",
    srcs = ["sharding_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:sharding_op_util",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "concat_op",
    srcs = ["concat_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":shape_util",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal_util",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "scan_ops",
    srcs = ["scan_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "image_resize_ops",
    srcs = ["image_resize_ops.cc"],
    hdrs = ["image_resize_ops.h"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/jit:xla_activity_listener",
        "//tensorflow/compiler/jit:xla_activity_proto_cc",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/strings:str_format",
        "@com_google_absl//absl/types:span",
        "@local_xla//xla:array4d",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "spacetobatch_op",
    srcs = ["spacetobatch_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core/util:overflow",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "lrn_ops",
    srcs = ["lrn_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "binary_ops",
    srcs = ["binary_ops.cc"],
    deps = [
        ":case_op",
        ":cwise_ops",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:client_library",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "roll_op",
    srcs = ["roll_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:lib",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:slicing",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "random_ops_util",
    srcs = ["random_ops_util.cc"],
    hdrs = ["random_ops_util.h"],
    deps = [
        ":case_op",
        ":if_op",
        ":rng_converter_utils",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core/kernels:stateless_random_ops_v2_header",
        "@com_google_absl//absl/strings",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:prng",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "unary_ops",
    srcs = ["unary_ops.cc"],
    deps = [
        ":case_op",
        ":cwise_ops",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:client_library",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "cwise_ops",
    srcs = ["cwise_ops.cc"],
    hdrs = ["cwise_ops.h"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@local_xla//xla:shape_util",
        "@local_xla//xla/client:client_library",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "matrix_triangular_solve_op",
    srcs = ["matrix_triangular_solve_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "relu_op",
    srcs = ["relu_op.cc"],
    hdrs = ["relu_op.h"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "reduction_ops_common",
    srcs = ["reduction_ops_common.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":reduction_ops",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@com_google_absl//absl/strings",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "bucketize_op",
    srcs = ["bucketize_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "depthtospace_op",
    srcs = ["depthtospace_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:data_format",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_optimization_barrier_op",
    srcs = ["xla_optimization_barrier_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "matmul_op",
    srcs = ["matmul_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_tsl//tsl/platform:tensor_float_32_hdr_lib",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:matrix",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ) + if_static(["@local_tsl//tsl/platform:tensor_float_32_utils"]),
)

tf_kernel_library(
    name = "matrix_solve_op",
    srcs = ["matrix_solve_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:matrix",
        "@local_xla//xla/client/lib:qr",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "categorical_op",
    srcs = ["categorical_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":random_ops_util",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:prng",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "dynamic_stitch_op",
    srcs = ["dynamic_stitch_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal_util",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "beta_op",
    srcs = ["beta_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla:status_macros",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:loops",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "unique_op",
    srcs = ["unique_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core/tpu:tpu_defs",
        "@com_google_absl//absl/types:optional",
        "@local_xla//xla:comparison_util",
        "@local_xla//xla:literal",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:comparators",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "reshape_op",
    srcs = ["reshape_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal",
        "@local_xla//xla:util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "pooling_ops",
    srcs = ["pooling_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
        "@local_xla//xla:util",
        "@local_xla//xla/client:value_inference",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:pooling",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "data_format_ops",
    srcs = ["data_format_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:slicing",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_dequantize_op",
    srcs = ["xla_dequantize_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:quantize",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "const_op",
    srcs = ["const_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "shape_op",
    srcs = ["shape_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":shape_util",
        ":tensor_list_utils",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@com_google_absl//absl/container:flat_hash_set",
        "@com_google_absl//absl/strings:str_format",
        "@local_xla//xla:literal",
        "@local_xla//xla:shape_util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "image_ops",
    srcs = ["image_ops.cc"],
    deps = [
        ":case_op",
        ":gather_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:util",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core:protos_all_cc",
        "@com_google_absl//absl/types:span",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:comparators",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:dynamic_shaped_ops",
        "@local_xla//xla/client/lib:loops",
        "@local_xla//xla/client/lib:sorting",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "retval_op",
    srcs = ["retval_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:status_macros",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_custom_call_v2_op",
    srcs = ["xla_custom_call_v2_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "listdiff_op",
    srcs = ["listdiff_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/container:flat_hash_set",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "sendrecv_ops",
    srcs = ["sendrecv_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "conv_ops",
    srcs = ["conv_ops.cc"],
    deps = [
        ":case_op",
        ":conv_op_helpers",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla:literal_util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:matrix",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "dequantize_op",
    srcs = ["dequantize_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:matrix",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "ensure_shape_op",
    srcs = ["ensure_shape_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "where_op",
    srcs = ["where_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core/tpu:tpu_defs",
        "@com_google_absl//absl/strings",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:status_macros",
        "@local_xla//xla:util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:comparators",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:dynamic_shaped_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "stack_ops",
    srcs = ["stack_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_reduce_precision_op",
    srcs = ["xla_reduce_precision_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "diag_op",
    srcs = ["diag_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:util",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:matrix",
        "@local_xla//xla/client/lib:pooling",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "index_ops",
    srcs = ["index_ops.cc"],
    hdrs = ["index_ops.h"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:shape_util",
        "@local_xla//xla/client/lib:arithmetic",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "lower_upper_bound_ops",
    srcs = ["lower_upper_bound_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:comparison_util",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "spacetodepth_op",
    srcs = ["spacetodepth_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:data_format",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "empty_op",
    srcs = ["empty_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "bincount_op",
    srcs = ["bincount_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla:shape_util",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:comparators",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "tridiagonal_ops",
    srcs = ["tridiagonal_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla/client/lib:slicing",
        "@local_xla//xla/client/lib:tridiagonal",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "device_index_op",
    srcs = ["device_index_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/strings",
        "@local_xla//xla/client:client_library",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "bcast_ops",
    srcs = ["bcast_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@com_google_absl//absl/strings",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:value_inference",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "aggregate_ops",
    srcs = ["aggregate_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":tensor_list_utils",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:lib",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "split_op",
    srcs = ["split_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "replica_id_op",
    srcs = ["replica_id_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "bias_ops",
    srcs = ["bias_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_select_and_scatter_op",
    srcs = ["xla_select_and_scatter_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "stateless_random_ops_v2",
    srcs = ["stateless_random_ops_v2.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":random_ops_util",
        ":rng_converter_utils",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:random",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core/kernels:stateless_random_ops_v2_header",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:dynamic_shaped_ops",
        "@local_xla//xla/client/lib:prng",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "approx_topk_op",
    srcs = ["approx_topk_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "//tensorflow/core/tpu:tpu_defs",
        "@com_google_absl//absl/strings",
        "@local_xla//xla:literal_util",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/client/lib:approx_topk",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "stateful_random_ops",
    srcs = ["stateful_random_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":random_ops_util",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:random",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core/kernels:stateful_random_ops_header",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
        "@local_xla//xla/client/lib:prng",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "no_op",
    srcs = ["no_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_conv_op",
    srcs = ["xla_conv_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "broadcast_to_op",
    srcs = ["broadcast_to_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:lib",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "sequence_ops",
    srcs = ["sequence_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "variable_ops",
    srcs = ["variable_ops.cc"],
    deps = [
        ":case_op",
        ":gather_op",
        ":if_op",
        ":shape_util",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:scatter",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core/kernels:resource_variable_util",
        "//tensorflow/core/kernels:scatter_nd_util",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:slicing",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "matrix_diag_ops",
    srcs = ["matrix_diag_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:shape_util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:matrix",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "reverse_sequence_op",
    srcs = ["reverse_sequence_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_custom_call_op",
    srcs = ["xla_custom_call_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core:protos_all_cc",
        "//tensorflow/core/tpu:tpu_defs",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_self_adjoint_eig_op",
    srcs = ["xla_self_adjoint_eig_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:lib",
        "@local_xla//xla/client/lib:self_adjoint_eig",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "cast_op",
    srcs = ["cast_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/lib:util",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "dynamic_slice_ops",
    srcs = ["dynamic_slice_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "fft_ops",
    srcs = ["fft_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal_util",
        "@local_xla//xla:util",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "xla_pad_op",
    srcs = ["xla_pad_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/strings",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "one_hot_op",
    srcs = ["one_hot_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "unpack_op",
    srcs = ["unpack_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "elu_op",
    srcs = ["elu_op.cc"],
    hdrs = ["elu_op.h"],
    deps = [
        ":case_op",
        ":cwise_ops",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:literal",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "batch_norm_op",
    srcs = ["batch_norm_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":relu_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "extract_image_patches_op",
    srcs = ["extract_image_patches_op.cc"],
    deps = [
        ":case_op",
        ":conv_op_helpers",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:util",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:matrix",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "scatter_nd_op",
    srcs = ["scatter_nd_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:scatter",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla:shape_util",
        "@local_xla//xla:status_macros",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "fill_op",
    srcs = ["fill_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:value_inference",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "stateless_random_ops",
    srcs = ["stateless_random_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":random_ops_util",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/lib:broadcast",
        "//tensorflow/compiler/tf2xla/lib:random",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
        "@local_xla//xla/client/lib:prng",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "gather_scatter_ops",
    srcs = ["gather_scatter_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:protos_all_cc",
        "@local_xla//xla:xla_data_proto_cc",
        "@local_xla//xla/client:xla_builder",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "einsum_op",
    srcs = ["einsum_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:matrix",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "cholesky_op",
    srcs = ["cholesky_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:matrix",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "quantize_and_dequantize_op",
    srcs = ["quantize_and_dequantize_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client:xla_computation",
        "@local_xla//xla/client/lib:arithmetic",
        "@local_xla//xla/client/lib:constants",
        "@local_xla//xla/client/lib:math",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "fake_quantize_ops",
    srcs = ["fake_quantize_ops.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:lib",
        "@local_xla//xla/client:xla_builder",
        "@local_xla//xla/client/lib:arithmetic",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_kernel_library(
    name = "fake_param_op",
    srcs = ["fake_param_op.cc"],
    deps = [
        ":case_op",
        ":if_op",
        ":while_op",
        ":xla_call_module_op",
        "//tensorflow/compiler/tf2xla:common",
        "//tensorflow/compiler/tf2xla:xla_compilation_device",
        "//tensorflow/compiler/tf2xla:xla_compiler",
        "//tensorflow/compiler/tf2xla:xla_context",
        "//tensorflow/compiler/tf2xla:xla_helpers",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/compiler/tf2xla:xla_resource",
        "//tensorflow/compiler/tf2xla/ops:xla_ops",
        "//tensorflow/core:framework",
        "@local_xla//xla/client/lib:constants",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)

tf_cc_test(
    name = "rng_converter_utils_test",
    srcs = ["rng_converter_utils_test.cc"],
    deps = [
        ":rng_converter_utils",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
        "//tensorflow/core:framework",
        "@com_google_googletest//:gtest_main",
        "@local_xla//xla:xla_data_proto_cc",
    ],
)

tf_kernel_library(
    name = "uniform_quantized_ops",
    srcs = ["uniform_quantized_ops.cc"],
    deps = [
        "//tensorflow/compiler/tf2xla:mlir_xla_op_kernel",
        "//tensorflow/compiler/tf2xla:xla_op_registry",
    ] + if_cuda_or_rocm(
        if_false = [],
        if_true = [":light_outside_compilation"],
    ),
)
